home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / Terminals.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  11.6 KB  |  507 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Terminals.a
  3. ;
  4. ;    Contains:    Communications Toolbox Terminal tool Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__TERMINALS__') = 'UNDEFINED' THEN
  21. __TERMINALS__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  25.     include 'Dialogs.a'
  26.     ENDIF
  27. ;        include 'Errors.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'Memory.a'                                            ;
  30. ;            include 'Types.a'                                        ;
  31. ;            include 'MixedMode.a'                                    ;
  32. ;        include 'Menus.a'                                            ;
  33. ;            include 'Quickdraw.a'                                    ;
  34. ;                include 'QuickdrawText.a'                            ;
  35. ;        include 'Controls.a'                                        ;
  36. ;        include 'Windows.a'                                        ;
  37. ;            include 'Events.a'                                        ;
  38. ;                include 'OSUtils.a'                                ;
  39. ;        include 'TextEdit.a'                                        ;
  40.  
  41.     IF &TYPE('__CTBUTILITIES__') = 'UNDEFINED' THEN
  42.     include 'CTBUtilities.a'
  43.     ENDIF
  44. ;        include 'StandardFile.a'                                    ;
  45. ;            include 'Files.a'                                        ;
  46. ;                include 'Finder.a'                                    ;
  47. ;        include 'AppleTalk.a'                                        ;
  48.  
  49.     IF &TYPE('__CONNECTIONS__') = 'UNDEFINED' THEN
  50.     include 'Connections.a'
  51.     ENDIF
  52.  
  53. ; current Terminal Manager version     
  54. curTMVersion                    EQU        2
  55. ; current Terminal Manager Environment Record version     
  56. curTermEnvRecVers                EQU        0
  57. ; error codes    
  58. tmGenericError                    EQU        -1
  59. tmNoErr                            EQU        0
  60. tmNotSent                        EQU        1
  61. tmEnvironsChanged                EQU        2
  62. tmNotSupported                    EQU        7
  63. tmNoTools                        EQU        8
  64.  
  65. ; typedef OSErr             TMErr
  66.  
  67. tmInvisible                        EQU        1 << 0
  68. tmSaveBeforeClear                EQU        1 << 1
  69. tmNoMenus                        EQU        1 << 2
  70. tmAutoScroll                    EQU        1 << 3
  71. tmConfigChanged                    EQU        1 << 4
  72.  
  73. ; typedef unsigned long     TMFlags
  74.  
  75. selTextNormal                    EQU        1 << 0
  76. selTextBoxed                    EQU        1 << 1
  77. selGraphicsMarquee                EQU        1 << 2
  78. selGraphicsLasso                EQU        1 << 3
  79. tmSearchNoDiacrit                EQU        1 << 8
  80. tmSearchNoCase                    EQU        1 << 9
  81.  
  82. ; typedef unsigned short     TMSearchTypes
  83. ; typedef short             TMSelTypes
  84.  
  85. cursorText                        EQU        1
  86. cursorGraphics                    EQU        2
  87.  
  88. ; typedef unsigned short     TMCursorTypes
  89.  
  90. tmTextTerminal                    EQU        1 << 0
  91. tmGraphicsTerminal                EQU        1 << 1
  92.  
  93. ; typedef unsigned short     TMTermTypes
  94. TermDataBlock             RECORD    0
  95. flags                     ds.w   1        ; offset: $0 (0)
  96. theData                     ds.l   1        ; offset: $2 (2)
  97. auxData                     ds.l   1        ; offset: $6 (6)
  98. reserved                 ds.l   1        ; offset: $A (10)
  99. sizeof                     EQU *            ; size:   $E (14)
  100.                         ENDR
  101.  
  102. ; typedef struct TermDataBlock  TermDataBlock
  103. ; typedef TermDataBlock     *TermDataBlockPtr, **TermDataBlockH, **TermDataBlockHandle
  104. TermEnvironRec             RECORD    0
  105. version                     ds.w   1        ; offset: $0 (0)
  106. termType                 ds.w   1        ; offset: $2 (2)
  107. textRows                 ds.w   1        ; offset: $4 (4)
  108. textCols                 ds.w   1        ; offset: $6 (6)
  109. cellSize                 ds     Point    ; offset: $8 (8)
  110. graphicSize                 ds     Rect    ; offset: $C (12)
  111. slop                     ds     Point    ; offset: $14 (20)
  112. auxSpace                 ds     Rect    ; offset: $18 (24)
  113. sizeof                     EQU *            ; size:   $20 (32)
  114.                         ENDR
  115.  
  116. ; typedef struct TermEnvironRec  TermEnvironRec
  117. ; typedef TermEnvironRec     *TermEnvironPtr
  118. TMSelection             RECORD    0
  119. selRect                     ds     Rect    ; offset: $0 (0)
  120.                          ORG 0
  121. selRgnHandle             ds.l   1        ; offset: $0 (0)
  122.                          ORG 8
  123. sizeof                     EQU *            ; size:   $8 (8)
  124.                         ENDR
  125.  
  126. ; typedef union TMSelection  TMSelection
  127. ; typedef struct TermRecord  TermRecord, *TermPtr, **TermHandle
  128. TermRecord                 RECORD    0
  129. procID                     ds.w   1        ; offset: $0 (0)
  130. flags                     ds.l   1        ; offset: $2 (2)
  131. errCode                     ds.w   1        ; offset: $6 (6)
  132. refCon                     ds.l   1        ; offset: $8 (8)
  133. userData                 ds.l   1        ; offset: $C (12)
  134. defProc                     ds.l   1        ; offset: $10 (16)
  135. config                     ds.l   1        ; offset: $14 (20)
  136. oldConfig                 ds.l   1        ; offset: $18 (24)
  137. environsProc             ds.l   1        ; offset: $1C (28)
  138. reserved1                 ds.l   1        ; offset: $20 (32)
  139. reserved2                 ds.l   1        ; offset: $24 (36)
  140. tmPrivate                 ds.l   1        ; offset: $28 (40)
  141. sendProc                 ds.l   1        ; offset: $2C (44)
  142. breakProc                 ds.l   1        ; offset: $30 (48)
  143. cacheProc                 ds.l   1        ; offset: $34 (52)
  144. clikLoop                 ds.l   1        ; offset: $38 (56)
  145. owner                     ds.l   1        ; offset: $3C (60)
  146. termRect                 ds     Rect    ; offset: $40 (64)
  147. viewRect                 ds     Rect    ; offset: $48 (72)
  148. visRect                     ds     Rect    ; offset: $50 (80)
  149. lastIdle                 ds.l   1        ; offset: $58 (88)
  150. selection                 ds.l   2        ; offset: $5C (92)
  151. selType                     ds.w   1        ; offset: $64 (100)
  152. mluField                 ds.l   1        ; offset: $66 (102)
  153. sizeof                     EQU *            ; size:   $6A (106)
  154.                         ENDR
  155.  
  156. ;
  157. ; pascal TMErr InitTM(void)
  158. ;
  159.     IF GENERATINGCFM THEN
  160.         IMPORT_CFM_FUNCTION    InitTM
  161.     ENDIF
  162.  
  163. ;
  164. ; pascal Handle TMGetVersion(TermHandle hTerm)
  165. ;
  166.     IF GENERATINGCFM THEN
  167.         IMPORT_CFM_FUNCTION    TMGetVersion
  168.     ENDIF
  169.  
  170. ;
  171. ; pascal short TMGetTMVersion(void)
  172. ;
  173.     IF GENERATINGCFM THEN
  174.         IMPORT_CFM_FUNCTION    TMGetTMVersion
  175.     ENDIF
  176.  
  177. ;
  178. ; pascal TermHandle TMNew(const Rect *termRect, const Rect *viewRect, TMFlags flags, short procID, WindowPtr owner, TerminalSendUPP sendProc, TerminalCacheUPP cacheProc, TerminalBreakUPP breakProc, TerminalClikLoopUPP clikLoop, TerminalEnvironsUPP environsProc, long refCon, long userData)
  179. ;
  180.     IF GENERATINGCFM THEN
  181.         IMPORT_CFM_FUNCTION    TMNew
  182.     ENDIF
  183.  
  184. ;
  185. ; pascal void TMDispose(TermHandle hTerm)
  186. ;
  187.     IF GENERATINGCFM THEN
  188.         IMPORT_CFM_FUNCTION    TMDispose
  189.     ENDIF
  190.  
  191. ;
  192. ; pascal void TMKey(TermHandle hTerm, const EventRecord *theEvent)
  193. ;
  194.     IF GENERATINGCFM THEN
  195.         IMPORT_CFM_FUNCTION    TMKey
  196.     ENDIF
  197.  
  198. ;
  199. ; pascal void TMUpdate(TermHandle hTerm, RgnHandle visRgn)
  200. ;
  201.     IF GENERATINGCFM THEN
  202.         IMPORT_CFM_FUNCTION    TMUpdate
  203.     ENDIF
  204.  
  205. ;
  206. ; pascal void TMPaint(TermHandle hTerm, const TermDataBlock *theTermData, const Rect *theRect)
  207. ;
  208.     IF GENERATINGCFM THEN
  209.         IMPORT_CFM_FUNCTION    TMPaint
  210.     ENDIF
  211.  
  212. ;
  213. ; pascal void TMActivate(TermHandle hTerm, Boolean activate)
  214. ;
  215.     IF GENERATINGCFM THEN
  216.         IMPORT_CFM_FUNCTION    TMActivate
  217.     ENDIF
  218.  
  219. ;
  220. ; pascal void TMResume(TermHandle hTerm, Boolean resume)
  221. ;
  222.     IF GENERATINGCFM THEN
  223.         IMPORT_CFM_FUNCTION    TMResume
  224.     ENDIF
  225.  
  226. ;
  227. ; pascal void TMClick(TermHandle hTerm, const EventRecord *theEvent)
  228. ;
  229.     IF GENERATINGCFM THEN
  230.         IMPORT_CFM_FUNCTION    TMClick
  231.     ENDIF
  232.  
  233. ;
  234. ; pascal void TMIdle(TermHandle hTerm)
  235. ;
  236.     IF GENERATINGCFM THEN
  237.         IMPORT_CFM_FUNCTION    TMIdle
  238.     ENDIF
  239.  
  240. ;
  241. ; pascal long TMStream(TermHandle hTerm, void *theBuffer, long theLength, CMFlags flags)
  242. ;
  243.     IF GENERATINGCFM THEN
  244.         IMPORT_CFM_FUNCTION    TMStream
  245.     ENDIF
  246.  
  247. ;
  248. ; pascal Boolean TMMenu(TermHandle hTerm, short menuID, short item)
  249. ;
  250.     IF GENERATINGCFM THEN
  251.         IMPORT_CFM_FUNCTION    TMMenu
  252.     ENDIF
  253.  
  254. ;
  255. ; pascal void TMReset(TermHandle hTerm)
  256. ;
  257.     IF GENERATINGCFM THEN
  258.         IMPORT_CFM_FUNCTION    TMReset
  259.     ENDIF
  260.  
  261. ;
  262. ; pascal void TMClear(TermHandle hTerm)
  263. ;
  264.     IF GENERATINGCFM THEN
  265.         IMPORT_CFM_FUNCTION    TMClear
  266.     ENDIF
  267.  
  268. ;
  269. ; pascal void TMResize(TermHandle hTerm, const Rect *newViewRect)
  270. ;
  271.     IF GENERATINGCFM THEN
  272.         IMPORT_CFM_FUNCTION    TMResize
  273.     ENDIF
  274.  
  275. ;
  276. ; pascal long TMGetSelect(TermHandle hTerm, Handle theData, ResType *theType)
  277. ;
  278.     IF GENERATINGCFM THEN
  279.         IMPORT_CFM_FUNCTION    TMGetSelect
  280.     ENDIF
  281.  
  282. ;
  283. ; pascal void TMGetLine(TermHandle hTerm, short lineNo, TermDataBlock *theTermData)
  284. ;
  285.     IF GENERATINGCFM THEN
  286.         IMPORT_CFM_FUNCTION    TMGetLine
  287.     ENDIF
  288.  
  289. ;
  290. ; pascal void TMSetSelection(TermHandle hTerm, const TMSelection *theSelection, TMSelTypes selType)
  291. ;
  292.     IF GENERATINGCFM THEN
  293.         IMPORT_CFM_FUNCTION    TMSetSelection
  294.     ENDIF
  295.  
  296. ;
  297. ; pascal void TMScroll(TermHandle hTerm, short dh, short dv)
  298. ;
  299.     IF GENERATINGCFM THEN
  300.         IMPORT_CFM_FUNCTION    TMScroll
  301.     ENDIF
  302.  
  303. ;
  304. ; pascal Boolean TMValidate(TermHandle hTerm)
  305. ;
  306.     IF GENERATINGCFM THEN
  307.         IMPORT_CFM_FUNCTION    TMValidate
  308.     ENDIF
  309.  
  310. ;
  311. ; pascal void TMDefault(Ptr *theConfig, short procID, Boolean allocate)
  312. ;
  313.     IF GENERATINGCFM THEN
  314.         IMPORT_CFM_FUNCTION    TMDefault
  315.     ENDIF
  316.  
  317. ;
  318. ; pascal Handle TMSetupPreflight(short procID, long *magicCookie)
  319. ;
  320.     IF GENERATINGCFM THEN
  321.         IMPORT_CFM_FUNCTION    TMSetupPreflight
  322.     ENDIF
  323.  
  324. ;
  325. ; pascal void TMSetupSetup(short procID, const void *theConfig, short count, DialogPtr theDialog, long *magicCookie)
  326. ;
  327.     IF GENERATINGCFM THEN
  328.         IMPORT_CFM_FUNCTION    TMSetupSetup
  329.     ENDIF
  330.  
  331. ;
  332. ; pascal Boolean TMSetupFilter(short procID, const void *theConfig, short count, DialogPtr theDialog, EventRecord *theEvent, short *theItem, long *magicCookie)
  333. ;
  334.     IF GENERATINGCFM THEN
  335.         IMPORT_CFM_FUNCTION    TMSetupFilter
  336.     ENDIF
  337.  
  338. ;
  339. ; pascal void TMSetupItem(short procID, const void *theConfig, short count, DialogPtr theDialog, short *theItem, long *magicCookie)
  340. ;
  341.     IF GENERATINGCFM THEN
  342.         IMPORT_CFM_FUNCTION    TMSetupItem
  343.     ENDIF
  344.  
  345. ;
  346. ; pascal void TMSetupXCleanup(short procID, const void *theConfig, short count, DialogPtr theDialog, Boolean OKed, long *magicCookie)
  347. ;
  348.     IF GENERATINGCFM THEN
  349.         IMPORT_CFM_FUNCTION    TMSetupXCleanup
  350.     ENDIF
  351.  
  352. ;
  353. ; pascal void TMSetupPostflight(short procID)
  354. ;
  355.     IF GENERATINGCFM THEN
  356.         IMPORT_CFM_FUNCTION    TMSetupPostflight
  357.     ENDIF
  358.  
  359. ;
  360. ; pascal Ptr TMGetConfig(TermHandle hTerm)
  361. ;
  362.     IF GENERATINGCFM THEN
  363.         IMPORT_CFM_FUNCTION    TMGetConfig
  364.     ENDIF
  365.  
  366. ;
  367. ; pascal short TMSetConfig(TermHandle hTerm, const void *thePtr)
  368. ;
  369.     IF GENERATINGCFM THEN
  370.         IMPORT_CFM_FUNCTION    TMSetConfig
  371.     ENDIF
  372.  
  373. ;
  374. ; pascal OSErr TMIntlToEnglish(TermHandle hTerm, const void *inputPtr, Ptr *outputPtr, short language)
  375. ;
  376.     IF GENERATINGCFM THEN
  377.         IMPORT_CFM_FUNCTION    TMIntlToEnglish
  378.     ENDIF
  379.  
  380. ;
  381. ; pascal OSErr TMEnglishToIntl(TermHandle hTerm, const void *inputPtr, Ptr *outputPtr, short language)
  382. ;
  383.     IF GENERATINGCFM THEN
  384.         IMPORT_CFM_FUNCTION    TMEnglishToIntl
  385.     ENDIF
  386.  
  387. ;
  388. ; pascal void TMGetToolName(short id, Str255 name)
  389. ;
  390.     IF GENERATINGCFM THEN
  391.         IMPORT_CFM_FUNCTION    TMGetToolName
  392.     ENDIF
  393.  
  394. ;
  395. ; pascal short TMGetProcID(ConstStr255Param name)
  396. ;
  397.     IF GENERATINGCFM THEN
  398.         IMPORT_CFM_FUNCTION    TMGetProcID
  399.     ENDIF
  400.  
  401. ;
  402. ; pascal void TMSetRefCon(TermHandle hTerm, long refCon)
  403. ;
  404.     IF GENERATINGCFM THEN
  405.         IMPORT_CFM_FUNCTION    TMSetRefCon
  406.     ENDIF
  407.  
  408. ;
  409. ; pascal long TMGetRefCon(TermHandle hTerm)
  410. ;
  411.     IF GENERATINGCFM THEN
  412.         IMPORT_CFM_FUNCTION    TMGetRefCon
  413.     ENDIF
  414.  
  415. ;
  416. ; pascal void TMSetUserData(TermHandle hTerm, long userData)
  417. ;
  418.     IF GENERATINGCFM THEN
  419.         IMPORT_CFM_FUNCTION    TMSetUserData
  420.     ENDIF
  421.  
  422. ;
  423. ; pascal long TMGetUserData(TermHandle hTerm)
  424. ;
  425.     IF GENERATINGCFM THEN
  426.         IMPORT_CFM_FUNCTION    TMGetUserData
  427.     ENDIF
  428.  
  429. ;
  430. ; pascal short TMAddSearch(TermHandle hTerm, ConstStr255Param theString, const Rect *where, TMSearchTypes searchType, TerminalSearchCallBackUPP callBack)
  431. ;
  432.     IF GENERATINGCFM THEN
  433.         IMPORT_CFM_FUNCTION    TMAddSearch
  434.     ENDIF
  435.  
  436. ;
  437. ; pascal void TMRemoveSearch(TermHandle hTerm, short refnum)
  438. ;
  439.     IF GENERATINGCFM THEN
  440.         IMPORT_CFM_FUNCTION    TMRemoveSearch
  441.     ENDIF
  442.  
  443. ;
  444. ; pascal void TMClearSearch(TermHandle hTerm)
  445. ;
  446.     IF GENERATINGCFM THEN
  447.         IMPORT_CFM_FUNCTION    TMClearSearch
  448.     ENDIF
  449.  
  450. ;
  451. ; pascal Point TMGetCursor(TermHandle hTerm, TMCursorTypes cursType)
  452. ;
  453.     IF GENERATINGCFM THEN
  454.         IMPORT_CFM_FUNCTION    TMGetCursor
  455.     ENDIF
  456.  
  457. ;
  458. ; pascal TMErr TMGetTermEnvirons(TermHandle hTerm, TermEnvironRec *theEnvirons)
  459. ;
  460.     IF GENERATINGCFM THEN
  461.         IMPORT_CFM_FUNCTION    TMGetTermEnvirons
  462.     ENDIF
  463.  
  464. ;
  465. ; pascal short TMChoose(TermHandle *hTerm, Point where, TerminalChooseIdleUPP idleProc)
  466. ;
  467.     IF GENERATINGCFM THEN
  468.         IMPORT_CFM_FUNCTION    TMChoose
  469.     ENDIF
  470.  
  471. ;
  472. ; pascal void TMEvent(TermHandle hTerm, const EventRecord *theEvent)
  473. ;
  474.     IF GENERATINGCFM THEN
  475.         IMPORT_CFM_FUNCTION    TMEvent
  476.     ENDIF
  477.  
  478. ;
  479. ; pascal Boolean TMDoTermKey(TermHandle hTerm, ConstStr255Param theKey)
  480. ;
  481.     IF GENERATINGCFM THEN
  482.         IMPORT_CFM_FUNCTION    TMDoTermKey
  483.     ENDIF
  484.  
  485. ;
  486. ; pascal short TMCountTermKeys(TermHandle hTerm)
  487. ;
  488.     IF GENERATINGCFM THEN
  489.         IMPORT_CFM_FUNCTION    TMCountTermKeys
  490.     ENDIF
  491.  
  492. ;
  493. ; pascal void TMGetIndTermKey(TermHandle hTerm, short id, Str255 theKey)
  494. ;
  495.     IF GENERATINGCFM THEN
  496.         IMPORT_CFM_FUNCTION    TMGetIndTermKey
  497.     ENDIF
  498.  
  499. ;
  500. ; pascal void TMGetErrorString(TermHandle hTerm, short id, Str255 errMsg)
  501. ;
  502.     IF GENERATINGCFM THEN
  503.         IMPORT_CFM_FUNCTION    TMGetErrorString
  504.     ENDIF
  505.  
  506.     ENDIF ; __TERMINALS__
  507.